<?php 

// define some constant to prevent other files to be requested directly
define("YTDJ", 1); 

// start session
session_start();

// no headers
header("Expires: Mon, 26 Jul 1990 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Content-type: text/html; charset=utf-8");

// error reporting
//error_reporting(E_ERROR | E_PARSE);
error_reporting(E_ALL ^ E_NOTICE);

// include functions
include('functions.php');

// get module
$module = $_GET["m"];

// get task
$task = $_GET["t"];

// default module
if (!$module) { $module = "main"; }

// default task
if (!$task) { $task = $module; }

// create main class
$YTDJ = new Main($module, $task);
$YTDJ->run();
?>

